<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>学生信息列表</title>
</head>
<body>
<h1>学生信息列表</h1>
<a href="../../webapp/WEB-INF/views/addStudent.jsp">添加学生</a>
<table border="1">
    <tr>
        <th>ID</th>
        <th>姓名</th>
        <th>性别</th>
        <th>操作</th>
    </tr>
    <div th:each="student:${students}">
        <tr>
            <td><span th:text="${student.id}"></span></td>
            <td><span th:text="${student.name}"></span></td>
            <td><span th:text="${student.sex}"></span></td>
            <td>
                <a th:href="@{'../student/edit/'+${student.id}}">编辑</a>
                <a th:href="@{'../student/delete/'+${student.id}}">删除</a>
            </td>
        </tr>
    </div>
</table>
</body>
</html>
